/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.fpt.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author TuanAnh
 */
@Embeddable
public class CheckStatusRoomPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 10)
    @Column(name = "roomId")
    private String roomId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 10)
    @Column(name = "checkStatus")
    private String checkStatus;

    public CheckStatusRoomPK() {
    }

    public CheckStatusRoomPK(String roomId, String checkStatus) {
        this.roomId = roomId;
        this.checkStatus = checkStatus;
    }

    public String getRoomId() {
        return roomId;
    }

    public void setRoomId(String roomId) {
        this.roomId = roomId;
    }

    public String getCheckStatus() {
        return checkStatus;
    }

    public void setCheckStatus(String checkStatus) {
        this.checkStatus = checkStatus;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (roomId != null ? roomId.hashCode() : 0);
        hash += (checkStatus != null ? checkStatus.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CheckStatusRoomPK)) {
            return false;
        }
        CheckStatusRoomPK other = (CheckStatusRoomPK) object;
        if ((this.roomId == null && other.roomId != null) || (this.roomId != null && !this.roomId.equals(other.roomId))) {
            return false;
        }
        if ((this.checkStatus == null && other.checkStatus != null) || (this.checkStatus != null && !this.checkStatus.equals(other.checkStatus))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "edu.fpt.entity.CheckStatusRoomPK[ roomId=" + roomId + ", checkStatus=" + checkStatus + " ]";
    }
    
}
